Object.defineProperty(exports, "__esModule", { value: !0 }),
  (exports.axios = void 0);
var e = require("../../@babel/runtime/helpers/classCallCheck"),
  r = require("../../@babel/runtime/helpers/createClass"),
  t = require("../common/wxENV"),
  n = function (e) {
    var r =
        arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "GET",
      n = arguments.length > 2 ? arguments[2] : void 0;
    return new Promise(function (u, i) {
      var o = {
        method: r,
        url: e,
        success: function (e) {
          u(e);
        },
        fail: function (e) {
          i(e);
        },
      };
      n && (o.data = n), (0, t.getWxEnv)().request(o);
    });
  },
  u = (function () {
    function t() {
      e(this, t);
    }
    return (
      r(t, null, [
        {
          key: "post",
          value: function (e, r) {
            return n(e, "POST", r);
          },
        },
        {
          key: "get",
          value: function (e) {
            return n(e);
          },
        },
      ]),
      t
    );
  })();
exports.axios = u;
